var XMLHttpRequestObject = false; 

      if (window.XMLHttpRequest) {
        XMLHttpRequestObject = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
        XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
      }

      function getData(textInput, dataSource, divID) 
      { 
          var text=document.getElementById(textInput).value;
          if(text.length>2){
        if(XMLHttpRequestObject) {
          var obj = document.getElementById(divID); 
          XMLHttpRequestObject.open("GET", dataSource+"?startOfName="+text); 

          XMLHttpRequestObject.onreadystatechange = function() 
          { 
            if (XMLHttpRequestObject.readyState == 4 && 
              XMLHttpRequestObject.status == 200) { 
                obj.innerHTML = XMLHttpRequestObject.responseText; 
            } 
          } 

          XMLHttpRequestObject.send(null); 
        }
      }else{
    	  document.getElementById(divID).innerHTML='<select size="1" style="width: 30em;" id="selbx" onkeyup="return findOption(this)"><option value ="0">Type in more letters above!!</option> </select>'; 
      }
      }